/*
 * @Autor: dingxiaolin
 * @Date: 2020-05-20 23:54:26
 * @LastEditors: dingxiaolin
 * @LastEditTime: 2020-05-28 12:09:29
 */
const { createProxyMiddleware } = require("http-proxy-middleware");

module.exports = function (app) {
  app.use(
    createProxyMiddleware("/api", {
      target: "http://localhost:8000/",
      changeOrigin: true,
      pathRewrite: {
        "^/api": "",
      },
    })
  );
};
